home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / overview / win2maccountersamples / 4. counterdocument / source / ccounterdocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.7 KB  |  52 lines

  1. /*
  2.     File:        CCounterDocument.h
  3.  
  4.     Contains:    Sample code to accompany Chapter 12 of 
  5.                 "An Introduction to Macintosh Programming for Windows Programmers".
  6.                 
  7.     Written by:    Worldwide Developer Technical Support
  8.  
  9.     Copyright:    1999 Apple Computer, Inc., All Rights Reserved
  10.  
  11.       You may incorporate this sample code into your applications without
  12.       restriction, though the sample code has been provided "AS IS" and the
  13.       responsibility for its operation is 100% yours.  However, what you are
  14.       not permitted to do is to redistribute the source as "DSC Sample Code"
  15.       after having made changes. If you're going to re-distribute the source,
  16.      we require that you make it clear in the source that the code was
  17.     descended from Apple Sample Code, but that you've made changes.
  18.     
  19. */
  20. #pragma once
  21.  
  22. #include <LSingleDoc.h>
  23. #include "CCounter.h"
  24.  
  25. // =================================================================================
  26. class CCounterDocument : public LSingleDoc {
  27. public:
  28.                         CCounterDocument(LCommander* inSuper, FSSpec* inFileSpec);
  29. // overrides
  30.     virtual Boolean        IsModified();
  31.     virtual void        DoAESave(FSSpec& inFileSpec, OSType inFileType);
  32.     virtual void        DoSave();
  33.     virtual void        DoRevert();
  34.     virtual void        DoPrint();
  35.     virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  36.     virtual void        FindCommandStatus(CommandT inCommand,
  37.                                     Boolean &outEnabled, Boolean &outUsesMark,
  38.                                     Char16 &outMark, Str255 outName);
  39. protected:
  40.     void                NameNewDoc();
  41.     void                OpenFile(FSSpec& inFileSpec);
  42.     void                SetPrintFrameSize();
  43. // new members
  44.     virtual LWindow*    MakeControlsWindow();
  45.     virtual    Boolean        AskForValue(Int32& newValue);
  46. private:
  47.     CCounter            stCounter;
  48.     LCaption*            mCaption;
  49. //    LWindow*            mWindow;
  50. //    LFile*                mFile;
  51.     Boolean                mIsDirty;
  52. };